package com.bdq.basic.infrastructure.persistence.mysql.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bdq.basic.infrastructure.persistence.mysql.pojo.BaseRegion;
import com.bdq.basic.infrastructure.persistence.mysql.service.BaseRegionService;
import com.bdq.basic.infrastructure.persistence.mysql.mapper.BaseRegionMapper;
import com.bdq.common.enums.YesOrNoEnum;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author malei
* @description 针对表【base_region(基础区域表)】的数据库操作Service实现
* @createDate 2024-05-10 11:20:32
*/
@Service
public class BaseRegionServiceImpl extends ServiceImpl<BaseRegionMapper, BaseRegion>
    implements BaseRegionService{

    @Override
    public List<BaseRegion> listRegion(Long parentRegionId) {
        return lambdaQuery()
                .eq(BaseRegion::getParentId, parentRegionId)
                .eq(BaseRegion::getIsDeleted, YesOrNoEnum.NO.getCode())
                .list();
    }
}




